package com.swak.frame.datasource.spring.configuration;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;

import com.swak.frame.SwakConstants;

@Configuration
@PropertySource(value = {"${swak.datasource.filePath:}"}, ignoreResourceNotFound = true)
@ConditionalOnProperty(prefix = SwakConstants.SWAK_DATA_SOURCE, name = "enabled", havingValue = "true",
    matchIfMissing = false)
@Import(SwakDataSourceRegister.class)
public class SwakDataSourceAutoConfiguration {
    // private Logger logger = LoggerFactory.getLogger(this.getClass());
}
